<?php get_header(); ?>
<!-- 复制内容弹窗版权提醒 -->
<script type="text/javascript">
    document.body.oncopy=function(){alert("复制成功！撰文不易，转载请务必保留原文链接，谢谢合作！");}
</script>


<!--背景图：https://www.npc.ink/2927.html-->
<div class="single-bj" style="background-image: url(<?php
$full_image_url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full');
echo $full_image_url[0];?>); ">
    <div class="single-main-header">
        <div class="single-main-txt">

            <!--文章标题-->
            <div class="single-title"><?php the_title(); ?></div>

            <!--博文附加内容-->
            <div class="single-meta">

                <!--时间：--><?php the_time( 'Y.m.d' ); ?>
                •
                <!--阅览次数-->阅读：<?php post_views('', ''); ?>
                •
                <!--类别：--><?php the_category(','); ?>
                •
                <!--功能菜单--><?php edit_post_link('编辑', '', '' ); ?>
            </div>

        </div>
    </div>
</div>

<!--博文外框-->
<div class="single-blog">
    <div class="single-blog-box">

        <!--博文摘要-->
        <div class="single-abstract effects">
            <?php
            echo wp_trim_words( get_the_excerpt(), 50 ); // 文章摘要
            ?>
        </div>

        <!--博文内容-->

        <div id="content" class="single-content">
            <?php while( have_posts() ): the_post(); $p_id = get_the_ID(); ?>
                <?php the_content(); ?>
            <?php endwhile; ?>

        </div>





        <!--博文标签、编辑日期-->
        <div class="single-blog-meat">

            <!--博文标签-->
            <div class="single-tag effects">
                <?php echo get_the_tag_list('标签:'.' ',',');?>
            </div>

            <!--最后更新时间：https://www.npc.ink/4421.html-->
            <div class="single-time">
                <?php echo '发表于 '.timeago( get_gmt_from_date(get_the_time('Y-m-d G:i:s')) ); ?>
            </div>

        </div>

<?php comments_template(); ?>


    </div>
</div>


<?php get_footer(); ?>
